package MemberAction;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import DAO.MemberDAO;

public class MemberIdCheckAction implements MemAction{

	@Override
	public void execute(HttpServletRequest request, HttpServletResponse response) {
		String id = request.getParameter("id");
		MemberDAO dao = new MemberDAO();
		boolean flag = dao.idCheck(id);
		
		request.setAttribute("id", id);
		request.setAttribute("flag", flag);
		RequestDispatcher dis = request.getRequestDispatcher("./member/member_idchk.jsp");
		try {
			dis.forward(request, response);
		} catch (ServletException | IOException e) {
			e.printStackTrace();
		}
	}

}
